package in.freshstart.java.training.arrays;

public class ArrayExerBubbleSort {
	public int[] bubbleSort(int[] argA) {
		int n = argA.length;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < (n - i)-1; j++) {
				if (argA[j] > argA[j + 1]) {
					int temp = argA[j];
					argA[j] = argA[j + 1];
					argA[j + 1] = temp;

				}
			}
		}

		return argA;
	}
}